<template>
    <view class="px-[20rpx] py-[16rpx] bg-[#F8F8F8]"> <u-search bgColor="#fff" :showAction="false" placeholder="搜索城市"
            v-model="city"></u-search></view>
    <view @click="select(item.id)" :class="selectValue==item.id?'text-[#FD755D]':'text-[#3D3D3D]'" class="text-[36rpx] mt-[32rpx] ml-[52rpx] font-medium" v-for="(item, index) in cityList" :key="index">{{ item.name }}</view>
    <view  class="bg-[#FD755D] rounded-sm left-[50%] translate-x-[-50%] text-[#fff] fixed bottom-[64rpx] w-[218rpx] h-[78rpx] flex items-center justify-center">确定</view>
</template>

<script setup>

import api from "@/api/api"
import { useUserStore } from '@/stores/userinfo'
import { ref } from "vue"
const city = ref('')
const selectValue = ref('')
const cityList = ref([{
    name: "南宁市",
    id: "53700"
}, {
    name: "桂林市",
    id: "53701"
}, {
    name: "柳州市",
    id: "53702"
}, {
    name: "百色市",
    id: "53703"
}, {
    name: "河池市",
    id: "53704"
}])
const select = (id) => {
    selectValue.value = id
}   

</script>

<style lang="scss" scoped></style>